/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package SQL;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author Miguel
 */
public class Conexion 
{
    public static Connection getConexion() 
    {
        Connection conexion = null;

        try {
            String driverClass = "com.mysql.jdbc.Driver";
            String driverURL = "jdbc:mysql://localhost:3307/garantia";
            Class.forName(driverClass);
            //cambiar pass al subir 1234
            conexion = DriverManager.getConnection(driverURL, "root", "");
        } catch (Exception z) {
            javax.swing.JOptionPane.showMessageDialog(null, "Problemas en la Conexion de la Base de Datos");
        }
        return conexion;
    }
}
